{% extends 'base_tabler.html' %} {% block content %}
<div class="container-xl">
  <div class="page-header d-print-none">
    <div class="row align-items-center">
      <div class="col">
        <h2 class="page-title">管理员仪表盘</h2>
      </div>
    </div>
  </div>

  <div class="row mt-3">
    <!-- 用户统计卡片 -->
    <div class="col-md-4">
      <div class="card">
        <div class="card-body">
          <h3 class="card-title">总用户数</h3>
          <div class="display-4">{{ total_users }}</div>
        </div>
      </div>
    </div>
    <div class="col-md-4">
      <div class="card">
        <div class="card-body">
          <h3 class="card-title">普通用户</h3>
          <div class="display-4">{{ regular_users }}</div>
        </div>
      </div>
    </div>
    <div class="col-md-4">
      <div class="card">
        <div class="card-body">
          <h3 class="card-title">管理员</h3>
          <div class="display-4">{{ admin_users }}</div>
        </div>
      </div>
    </div>
  </div>

  <div class="row mt-3">
    <div class="col-12">
      <div class="card">
        <div class="card-header">
          <h3 class="card-title">快速操作</h3>
        </div>
        <div class="card-body">
          <div class="row g-3">
            <div class="col-md-6">
              <a href="{% url 'user_management' %}" class="btn btn-primary w-100">
                <svg
                  xmlns="http://www.w3.org/2000/svg"
                  class="icon icon-tabler icon-tabler-users"
                  width="24"
                  height="24"
                  viewBox="0 0 24 24"
                  stroke-width="2"
                  stroke="currentColor"
                  fill="none"
                  stroke-linecap="round"
                  stroke-linejoin="round"
                >
                  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                  <circle cx="9" cy="7" r="4"></circle>
                  <path d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path>
                  <path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
                  <path d="M21 21v-2a4 4 0 0 0 -3 -3.85"></path>
                </svg>
                用户管理
              </a>
            </div>
            <div class="col-md-6">
              <a href="{% url 'data_management' %}" class="btn btn-primary w-100">
                <svg
                  xmlns="http://www.w3.org/2000/svg"
                  class="icon icon-tabler icon-tabler-database"
                  width="24"
                  height="24"
                  viewBox="0 0 24 24"
                  stroke-width="2"
                  stroke="currentColor"
                  fill="none"
                  stroke-linecap="round"
                  stroke-linejoin="round"
                >
                  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                  <ellipse cx="12" cy="6" rx="8" ry="3"></ellipse>
                  <path d="M4 6v6a8 3 0 0 0 16 0v-6"></path>
                  <path d="M4 12v6a8 3 0 0 0 16 0v-6"></path>
                </svg>
                数据管理
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}
